package design.factory.abstractFactory;

public class HandGunFactory implements GunFactory {
    @Override
    public Gun createGun() {
        return new HandGun();
    }
    @Override
    public Bullet createBullet() {
        return new HandGunBullet();
    }
    @Override
    public Gun getALoadedGun() {
        Gun handGun = new HandGun();
        for (int i = handGun
                .getChargeSize(); i < HandGun.CHARGER_CAPACITY; i++) {
            handGun.loading(createBullet());
        }
        return handGun;
    }
    private HandGunFactory() {}
    private static HandGunFactory f = new HandGunFactory();
    public static HandGunFactory getFoctory() {
        return f;
    }
}
